import com.google.gwt.xml.client.*;

/**
 * Date: Mar 1, 2007 Time: 9:52:26 AM
 *
 * @author pat
 */
public class TestSafariBug
{

    String xml="<?xml version='1.0' encoding='UTF-8'?>\n" +
        "<feed xmlns='http://www.w3.org/2005/Atom'\n" +
        "    xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'>\n" +
        "    <id>http://spreadsheets.google.com/feeds/spreadsheets/private/full</id>\n" +
        "    <updated>2007-03-01T15:13:23.836Z</updated>\n" +
        "    <category scheme='http://schemas.google.com/spreadsheets/2006'\n" +
        "        term='http://schemas.google.com/spreadsheets/2006#spreadsheet'></category>\n" +
        "    <title type='text'>Available Spreadsheets - patniemeyer@gmail.com</title>\n" +
        "    <link rel='alternate'\n" +
        "        type='text/html'\n" +
        "        href='http://docs.google.com'></link>\n" +
        "    <link rel='http://schemas.google.com/g/2005#feed'\n" +
        "        type='application/atom+xml'\n" +
        "        href='http://spreadsheets.google.com/feeds/spreadsheets/private/full'></link>\n" +
        "    <link rel='self'\n" +
        "        type='application/atom+xml'\n" +
        "        href='http://spreadsheets.google.com/feeds/spreadsheets/private/full'></link>\n" +
        "    <openSearch:totalResults>4</openSearch:totalResults>\n" +
        "    <openSearch:startIndex>1</openSearch:startIndex>\n" +
        "    <entry>\n" +
        "        <id>\n" +
        "            http://spreadsheets.google.com/feeds/spreadsheets/private/full/o14377293952935137485.7508056202762163826\n" +
        "        </id>\n" +
        "        <updated>2007-02-27T14:33:23.923Z</updated>\n" +
        "        <category scheme='http://schemas.google.com/spreadsheets/2006'\n" +
        "            term='http://schemas.google.com/spreadsheets/2006#spreadsheet'></category>\n" +
        "        <title type='text'>2007 Bodega Ledger</title>\n" +
        "        <content type='text'>2007 Bodega Ledger</content>\n" +
        "        <link rel='http://schemas.google.com/spreadsheets/2006#worksheetsfeed'\n" +
        "            type='application/atom+xml'\n" +
        "            href='http://spreadsheets.google.com/feeds/worksheets/o14377293952935137485.7508056202762163826/private/full'></link>\n" +
        "        <link rel='alternate'\n" +
        "            type='text/html'\n" +
        "            href='http://spreadsheets.google.com/ccc?key=335529887374.7508056202762163826'></link>\n" +
        "        <link rel='self'\n" +
        "            type='application/atom+xml'\n" +
        "            href='http://spreadsheets.google.com/feeds/spreadsheets/private/full/o14377293952935137485.7508056202762163826'></link>\n" +
        "        <author>\n" +
        "            <name>peckster</name>\n" +
        "            <email>peckster@gmail.com</email>\n" +
        "        </author>\n" +
        "    </entry>\n" +
        "</feed>";

    private void doTest() {
        Document doc = XMLParser.parse( xml );
        Element feed = doc.getDocumentElement();
        NodeList entries = feed.getElementsByTagName( "entry");
        //out( "got entries" );
        Element entry = (Element)entries.item(0);
        //out( "got entry" );
        NodeList children = entry.getChildNodes();
        for(int i = 0; i<children.getLength(); i++)
        {
            Node child = children.item( i );
            //out( "name="+child.getNodeName()+", prefix="+child.getPrefix()+", uri="+child.getNamespaceURI() );
        }
        //String text = DOMUtil.getSimpleElementText( entry, "title" );
        //out( "text = " + text );
        //Element first = DOMUtil.getFirstElement( entry, "title" );
        //out( "first = " + first );
        NodeList bars = entry.getElementsByTagName( "title" );
        //out( "test getElementByTagName found: "+bars.getLength() );
    }

}
